﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCTarefa.ascx.cs" Inherits="s2b.ControleDesenvolvimentoProjetos.UserControls.WUCTarefa" %>


<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<style type="text/css">
    .style2
    {
        width: 71px;
    }
    .style3
    {
        width: 154px;
    }
</style>

<table width="100%">
<tr>
    <td class="style2">
        Projeto
    </td>
    <td>
        <asp:DropDownList ID="ddlProjeto" runat="server" Height="29px" Width="128px">
        </asp:DropDownList>
        <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="*"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvProjeto" runat="server" 
            ControlToValidate="ddlProjeto" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
    <td class="style2">
        Tarefa
    </td>
    <td>
        <asp:TextBox ID="txtTarefa" runat="server"></asp:TextBox>
        <asp:Label ID="Label2" runat="server" ForeColor="Red" Text="*"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvTarefa" runat="server" 
            ControlToValidate="txtTarefa" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
    <td class="style2">
        Descrição
    </td>
    <td>
        <asp:TextBox ID="txtDescricao" TextMode="MultiLine" runat="server"></asp:TextBox>
        <asp:Label ID="Label3" runat="server" ForeColor="Red" Text="*"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvDescricao" runat="server" 
            ControlToValidate="txtDescricao" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
    </td>
</tr>

<tr>
    <td class="style2">
        Funcionário
    </td>
    <td>
        <asp:DropDownList ID="ddlFuncionario" runat="server" Height="21px" 
            Width="245px">
        </asp:DropDownList>
    </td>
</tr>

<tr>
    <td class="style2">
        Status
    </td>
    <td>
        <asp:DropDownList ID="ddlStatus" runat="server">
        </asp:DropDownList>
        <asp:Label ID="Label4" runat="server" ForeColor="Red" Text="*"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvStatus" runat="server" 
            ControlToValidate="ddlStatus" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
    <td colspan="2" width="100%">
        <asp:UpdatePanel ID="uPnlProjeto" runat="server">
            <ContentTemplate>
                <asp:Panel ID="pnlProjeto" runat="server">
                 
                        <table width="100%">
                            <tr>
                                <td colspan="" class="style3">
                                    Inicio
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDtInicio" runat="server" Enabled="False"></asp:TextBox>
                                    <asp:ImageButton ID="imgBtnCalendarInicio" runat="server" ImageUrl="~/Util/Imagens/calendar.png"
                                        OnClick="imgBtnCalendarInicio_Click" Style="text-align: left" CausesValidation="False" />
                                    <asp:Label ID="Label5" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                    <asp:RequiredFieldValidator ID="rfvDtInicio" runat="server" 
                                        ControlToValidate="txtDtInicio" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                </td>

                                <td>
                                    <asp:Calendar ID="calendarInicio" runat="server" Visible="false" OnSelectionChanged="calendarInicio_SelectionChanged">
                                    </asp:Calendar>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                    Fim
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDtFim" runat="server" Enabled="False"></asp:TextBox>
                                    <asp:ImageButton ID="imgBtnCalendarFim" runat="server" ImageUrl="~/Util/Imagens/calendar.png"
                                        OnClick="imgBtnCalendarFim_Click" CausesValidation="False" />
                                    <asp:Label ID="Label6" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                    <asp:RequiredFieldValidator ID="rfvDataFim" runat="server" ForeColor="Red" 
                                        ControlToValidate="txtDtFim">Campo Obrigatório</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style3">
                                </td>
                                <td>
                                    <asp:Calendar ID="calendarFim" runat="server" Visible="false" OnSelectionChanged="calendarFim_SelectionChanged">
                                    </asp:Calendar>
                                </td>
                            </tr>
                        </table>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </td>
</tr>
<tr>
    <td class="style2">
        Carga Horaria
    </td>
    <td>
        <asp:TextBox ID="txtCargaHoraria" runat="server"></asp:TextBox>
        <asp:Label ID="Label7" runat="server" ForeColor="Red" Text="*"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvCargaHor" runat="server" 
            ControlToValidate="txtCargaHoraria" ForeColor="Red">Campo Obrigatório</asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
    <td colspan="2">
        <asp:Button ID="btnTarefa" runat="server" Text="Tarefa" OnClick="btnTarefa_Click" />
    </td>
</tr>
<tr>
    <td colspan="2">
        <asp:Label ID="lblMsg" runat="server"></asp:Label>
    </td>
</tr>
</table>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:CS_DB_Controle_Projeto %>" SelectCommand="SELECT T.ID_TAREFA, P.NOME_PROJETO AS [Projeto], SP.DESC_STATUS AS [Status Projeto], F.NOME_FUNC AS [Colaborador],  T.NOME_TAREFA AS Tarefa, T.PORC_CONCLUSAO AS [Porcentagem], S.DESC_STATUS AS [Status Tarefa],T.DT_INICIO_TAREF AS [Data inicial Tarefa], T.DT_FINAL_TAREFA AS [Data final Tarefa], T.CARGA_HORARIA AS [Carga horária], T.CARG_HOR_UTILIZ AS [Carga horária utilizada]
 FROM TAREFAS AS T
INNER JOIN PROJETO AS P ON P.ID_PROJETO = T.ID_PROJETO 
LEFT JOIN FUNCIONARIO AS F ON F.ID_FUNC = T.ID_FUNC
INNER JOIN STATUS AS S ON S.ID_STATUS = T.ID_STATUS
INNER JOIN STATUS AS SP ON SP.ID_STATUS = P.ID_STATUS
"></asp:SqlDataSource>

